// component/index/newItem/newItem.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    entries: ["New Exotic Weapons", "New Exotic Armor", "New Exotic Items", "New Weapons", "New Armor", "New Quests", "New Shaders", "New Sparrows", "New Ships", "New Ghosts"]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoPage(e) {
      console.log(e.currentTarget.dataset.id)
      var id = e.currentTarget.dataset.id
      if (id === "New Exotic Weapons" || id === "New Weapons") {
        wx.navigateTo({
          url: '/pages/newWeapon/newWeapon?id=' + encodeURIComponent(id),
        })

      } else if (id === "New Exotic Armor" || id === "New Armor") {
        wx.navigateTo({
          url: '/pages/newArmor/newArmor?id=' + encodeURIComponent(id),
        })

      } else {
        wx.navigateTo({
          url: '/pages/other/other?id=' + encodeURIComponent(id),
        })
      }
    }
  }
})
